<%@ Page Language="C#" Inherits="Deepcode.Flux.Core.UI.CMS.CMSHistoryView"%>
<%@ Import Namespace="Deepcode.Flux.Core.Systems.CMS" %>
<%@ Register TagPrefix="flux" Namespace="Deepcode.Flux.Core.UI.Controls" Assembly="Deepcode.Flux.Core" %>

<script runat="server">
	protected override void LoadContent(Deepcode.Flux.Core.Systems.CMS.ContentObject load)
	{
		fType.Text = load.FK_STypeID;
		if( load.TypeTemplate != null ) fType.Text = load.TypeTemplate.TypeName;
		fNodeTitle.Text = load.NodeTitle;
		fVersionNumber.Text = load.VersionNumber.ToString();
		
		ContentObjectDataField [] f = load.Fields.GetFields();
		if( f.Length < 1 ) _fd.Visible = false;
		
		_fields.DataSource = f;
		_fields.DataBind();
	}
</script>

<html>
<head runat="server">
	<link href="../../../../../Asset/Style/GeneralStyle.css" rel="stylesheet" type="text/css" />
	<link href="../../localstyle.css" rel="stylesheet" type="text/css" />
</head>
<body bgcolor="#f2f2f2">

<form id="form1" runat="server">
<flux:HostTable runat="server">

<flux:PanelBox runat="server" Title="Content Version Information">
<flux:ShadePadBox runat="server">
<table cellspacing="0" cellpadding="3" border="0">
<tr><td><b>Type:</b></td>
	<td><asp:Label runat="server" ID="fType"/></td>
	</tr>
<tr><td><b>Version:</b></td>
	<td><asp:Label runat="server" ID="fVersionNumber"/></td>
	</tr>
<tr><td><b>Name:</b></td>
	<td><asp:Label runat="server" ID="fNodeTitle"/></td>
	</tr>
</table>
</flux:ShadePadBox>
</flux:PanelBox>

<flux:PanelBox runat="server" Title="Field Data" ID="_fd">
<flux:ShadePadBox runat="server">
<asp:Repeater runat="server" ID="_fields">
	<HeaderTemplate>
		<table cellspacing="0" cellpadding="3" border="0">
	</HeaderTemplate>
	<ItemTemplate>
		<tr><td valign="top"><b><%#DataBinder.Eval(Container.DataItem, "FieldName")%></b></td>
			<td valign="top"><%#((string) DataBinder.Eval(Container.DataItem, "FieldValue")).Replace("\n", "<br/>")%></td>
			</tr>
	</ItemTemplate>
	<SeparatorTemplate>
		<tr><td colspan="2"><hr noshade="noshade" size="1"/></td></tr>
	</SeparatorTemplate>
	<FooterTemplate>
		</table>
	</FooterTemplate>
</asp:Repeater>
</flux:ShadePadBox>
</flux:PanelBox>



</flux:HostTable>

</form>
</body>
</html>
